$OpenBSD: patch-src_i3_mk,v 1.9 2015/03/17 15:39:48 dcoppa Exp $

OpenBSD lacks pthread_condattr_setpshared(), so no need to link
with libpthread here.

--- src/i3.mk.orig	Sun Jun 15 19:12:43 2014 
+++ src/i3.mk		Wed Jul  2 19:18:24 2014 
@@ -6,7 +6,11 @@ i3_SOURCES           := $(filter-out $(i3_SOURCES_GENE
 i3_HEADERS_CMDPARSER := $(wildcard include/GENERATED_*.h)
 i3_HEADERS           := $(filter-out $(i3_HEADERS_CMDPARSER),$(wildcard include/*.h))
 i3_CFLAGS             = $(XKB_COMMON_CFLAGS) $(XCB_CFLAGS) $(XCB_KBD_CFLAGS) $(XCB_WM_CFLAGS) $(XCURSOR_CFLAGS) $(PANGO_CFLAGS) $(YAJL_CFLAGS) $(LIBEV_CFLAGS) $(PCRE_CFLAGS) $(LIBSN_CFLAGS)
+ifneq ($(UNAME),OpenBSD)
 i3_LIBS               = $(XKB_COMMON_LIBS) $(XCB_LIBS) $(XCB_XKB_LIBS) $(XCB_KBD_LIBS) $(XCB_WM_LIBS) $(XCURSOR_LIBS) $(PANGO_LIBS) $(YAJL_LIBS) $(LIBEV_LIBS) $(PCRE_LIBS) $(LIBSN_LIBS) -lm -lpthread
+else
+i3_LIBS               = $(XKB_COMMON_LIBS) $(XCB_LIBS) $(XCB_XKB_LIBS) $(XCB_KBD_LIBS) $(XCB_WM_LIBS) $(XCURSOR_LIBS) $(PANGO_LIBS) $(YAJL_LIBS) $(LIBEV_LIBS) $(PCRE_LIBS) $(LIBSN_LIBS) -lm
+endif
 
 # When using clang, we use pre-compiled headers to speed up the build. With
 # gcc, this actually makes the build slower.
@@ -75,20 +79,17 @@ install-i3: i3
 	$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3
 	$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions
 	$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/applications
-	$(INSTALL) -m 0755 i3 $(DESTDIR)$(PREFIX)/bin/
+	$(INSTALL_PROGRAM) i3 $(DESTDIR)$(PREFIX)/bin/
 	$(LN) -sf i3 $(DESTDIR)$(PREFIX)/bin/i3-with-shmlog
-	$(INSTALL) -m 0755 i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/
-	$(INSTALL) -m 0755 i3-sensible-editor $(DESTDIR)$(PREFIX)/bin/
-	$(INSTALL) -m 0755 i3-sensible-pager $(DESTDIR)$(PREFIX)/bin/
-	$(INSTALL) -m 0755 i3-sensible-terminal $(DESTDIR)$(PREFIX)/bin/
-	$(INSTALL) -m 0755 i3-save-tree $(DESTDIR)$(PREFIX)/bin/
-	$(INSTALL) -m 0755 i3-dmenu-desktop $(DESTDIR)$(PREFIX)/bin/
-	test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
-	test -e $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes || $(INSTALL) -m 0644 i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes
-	$(INSTALL) -m 0644 i3.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3.desktop
-	$(INSTALL) -m 0644 i3-with-shmlog.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3-with-shmlog.desktop
-	$(INSTALL) -m 0644 i3.applications.desktop $(DESTDIR)$(PREFIX)/share/applications/i3.desktop
-	$(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/
+	$(INSTALL_SCRIPT) i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/
+	$(INSTALL_SCRIPT) i3-save-tree $(DESTDIR)$(PREFIX)/bin/
+	$(INSTALL_SCRIPT) i3-dmenu-desktop $(DESTDIR)$(PREFIX)/bin/
+	$(INSTALL_DATA) i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
+	$(INSTALL_DATA) i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes
+	$(INSTALL_DATA) i3.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3.desktop
+	$(INSTALL_DATA) i3-with-shmlog.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3-with-shmlog.desktop
+	$(INSTALL_DATA) i3.applications.desktop $(DESTDIR)$(PREFIX)/share/applications/i3.desktop
+	$(INSTALL_DATA) include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/
 
 clean-i3:
 	echo "[i3] Clean"
